package com.cmpe451.nutty.service;

import java.util.List;

import com.cmpe451.nutty.model.Comment;
import com.cmpe451.nutty.model.Favorite;
import com.cmpe451.nutty.model.Ingredients;
import com.cmpe451.nutty.model.Menu;
import com.cmpe451.nutty.model.Menu_Recipe;
import com.cmpe451.nutty.model.Rate;
import com.cmpe451.nutty.model.Recipe;
import com.cmpe451.nutty.model.Recipe_Derive;
import com.cmpe451.nutty.model.Recipe_Tag;
import com.cmpe451.nutty.model.Style;
import com.cmpe451.nutty.model.Tools;
import com.cmpe451.nutty.model.Unit;
import com.cmpe451.nutty.model.User;
import com.cmpe451.nutty.so.GuiUser;

public interface RecipeService extends  CommonService {

    public Ingredients getIngredientById(long id);

    public Ingredients getIngredientByName(String name);
    
    public Recipe getRecipeById(Long id);
    
    public Tools getToolByName(String name);
    
    public Tools getToolById(Long id);

    public User getUserById(long id);

	public List<Recipe> getRecipes(GuiUser user);

	public List<Ingredients> getIngredients();

	public void saveRecipe(Recipe recipe);

	public void updateRecipe(Recipe recipe);
	
	public void updateIngredient(Ingredients ingredient);
	
	public List<Recipe> getLatestRecipes();

	public List<Comment> getCommentsById(Long recipeId);

	public void saveComment(Comment newComment);
	
	public void saveFav(Favorite newFavorite);
	
	public Favorite getFav(Long userId, Long recipeId);

	public List<Recipe> findSearchResults(String query);

	public List<Unit> getUnits();

	public List<Recipe> getLatestRecipesByUsername(String username);

	public List<Style> getStyles();

	public List<Recipe> getLatestRecipesInCircle(List<String> follows);
	
	public List<Tools> getTools();

	public void saveRate(Rate newRate);
	
	public void saveIngredient(Ingredients ingredient);

	public Rate findRatebyRecipe(String username, Long recipeId);

	public List<Recipe> rateRecipes(List<Recipe> recipes);

	public List<Rate> getTotalRate(Recipe recipe);

	public void updateRate(Rate oldRate);

	public void addTag(Recipe_Tag rt);

	public List<Recipe> findLikedRecipes(String str, int cookTime, String easiness);

	public List<Recipe> findDislikedRecipes(String str, int cookTime, String easiness);

	public List<Recipe> findRecipesBasedOnKeywords(String str);
	
	public List<Recipe> findAllRecipes();


	public List<Recipe> findLikedRecipes(String str);

	public List<Recipe> findDislikedRecipes(String str);
	public List<Favorite> findFavoritesByUserId(Long userId);

	public void deleteFav(Favorite thisFav);

	public void saveMenu(Menu m);

	public void saveMenu_Recipe(Menu_Recipe menuRec);

	public List<Menu> getMenusOfUser(long userid);

	public List<Menu_Recipe> getMenuRecipePairs(Long id);

	public List<Recipe> findRecipesWithName(String name);

	public void saveDerivedRecipe(Recipe_Derive newRecipe_Derive);

	public List<Recipe_Derive> findDerivedRecipesById(Long recipeId);
    
}
